#include <iostream>
#include <cmath>
using namespace std;
//数组存储位置测试
void erweishuju()
{
    int x = 0;
    int a[3][3] = {0};
    for (int i=0;i<3;i++)
        for (int j=0;j<3;j++)
            a[i][j] = x++;
    for (int i=0;i<3;i++)
    {
        for (int j=0;j<3;j++)
            printf("%d\t",a[i][j]);
        printf("\n");
    }
            
    int *y = NULL;
    y = &a[0][0];
    for (int i=0;i<3*3;i++)
        printf("y+%d=%d\n",i,*(y+i));
        

}
void sanweishuju()
{
    int x = 0;
    int a[3][3][3] = {0};
    for (int i=0;i<3;i++)
        for (int j=0;j<3;j++)
            for(int m=0;m<3;m++)
                a[i][j][m] = x++;
    for (int i=0;i<3;i++)
        for (int j=0;j<3;j++)
            for(int m=0;m<3;m++)
                printf("a[%d][%d][%d] = %d \n",i,j,m,a[i][j][m]);
            
    int *y = NULL;
    y = &a[0][0][0];
    for (int i=0;i<3*3*3;i++)
        printf("y+%d=%d\n",i,*(y+i));
        

}
int main()
{
    
    sanweishuju();

    return 0;
}